package com.google.ads.b;

import android.net.Uri;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import com.google.ads.AdActivity;
import com.google.ads.util.AdUtil;
import com.google.ads.util.d;
import com.google.ads.util.m;
import com.google.ads.util.w;
import java.util.HashMap;
import java.util.Map;

public class y extends WebViewClient
{
  private static final e c = (e)e.a.b();
  protected r a;
  protected boolean b;
  private final Map d;
  private final boolean e;
  private boolean f;
  private boolean g;
  private boolean h;

  public y(r paramr, Map paramMap, boolean paramBoolean1, boolean paramBoolean2)
  {
    this.a = paramr;
    this.d = paramMap;
    this.e = paramBoolean1;
    this.f = paramBoolean2;
    this.b = false;
    this.g = false;
    this.h = false;
  }

  public static y a(r paramr, Map paramMap, boolean paramBoolean1, boolean paramBoolean2)
  {
    if (AdUtil.a >= 11)
      return new w(paramr, paramMap, paramBoolean1, paramBoolean2);
    return new y(paramr, paramMap, paramBoolean1, paramBoolean2);
  }

  public void a(boolean paramBoolean)
  {
    this.b = paramBoolean;
  }

  public void b(boolean paramBoolean)
  {
    this.f = paramBoolean;
  }

  public void c(boolean paramBoolean)
  {
    this.g = paramBoolean;
  }

  public void d(boolean paramBoolean)
  {
    this.h = paramBoolean;
  }

  public void onPageFinished(WebView paramWebView, String paramString)
  {
    if (this.g)
    {
      j localj = this.a.i();
      if (localj == null)
        break label48;
      localj.b();
    }
    while (true)
    {
      this.g = false;
      if (this.h)
      {
        c.a(paramWebView);
        this.h = false;
      }
      return;
      label48: d.a("adLoader was null while trying to setFinishedLoadingHtml().");
    }
  }

  public boolean shouldOverrideUrlLoading(WebView paramWebView, String paramString)
  {
    Uri localUri;
    try
    {
      d.a("shouldOverrideUrlLoading(\"" + paramString + "\")");
      localUri = Uri.parse(paramString);
      if (c.a(localUri))
      {
        c.a(this.a, this.d, localUri, paramWebView);
        return true;
      }
      if (this.f)
      {
        if (AdUtil.a(localUri))
          return super.shouldOverrideUrlLoading(paramWebView, paramString);
        HashMap localHashMap2 = new HashMap();
        localHashMap2.put("u", paramString);
        AdActivity.a(this.a, new s("intent", localHashMap2));
        return true;
      }
    }
    catch (Throwable localThrowable)
    {
      d.b("An unknown error occurred in shouldOverrideUrlLoading.", localThrowable);
      return true;
    }
    if (this.e)
    {
      HashMap localHashMap1 = new HashMap();
      localHashMap1.put("u", localUri.toString());
      AdActivity.a(this.a, new s("intent", localHashMap1));
      return true;
    }
    d.e("URL is not a GMSG and can't handle URL: " + paramString);
    return true;
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.google.ads.b.y
 * JD-Core Version:    0.6.2
 */